/**
 * @Description: 公共样式
 * @Author: zhen
 * @Date: 2023-10-16
 */

/* global */
body,
ul,
li,
ol,
p,
span,
i,
input,
img,
textarea,
button,
iframe,
h1,
h2,
h3,
h4,
h5,
h6 {
  padding: 0;
  margin: 0;
  -webkit-tap-highlight-color: rgb(255 255 255 / 0%); // iso上点击某一元素会出现半透明灰色背景
}
body {
  height: 100vh;

  // "Hiragino Sans GB", "PingFangSC-Light"都是苹果字体
  font-family: 'Hiragino Sans GB', PingFangSC-Light, 'Microsoft YaHei', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4286;
  color: $content;
  -webkit-overflow-scrolling: touch; // 控制在移动设备上是否使用回弹效果
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section,
summary,
time,
mark,
audio,
video,
path,
select,
option {
  display: block;
  padding: 0;
  margin: 0;
  -webkit-tap-highlight-color: rgb(255 255 255 / 0%);
}
input,
textarea,
keygen,
select,
button {
  font-family: 'Hiragino Sans GB', PingFangSC-Light, 'Microsoft YaHei', Arial, sans-serif;
}
textarea {
  resize: none;
}
i,
address {
  font-style: normal;
}
ol,
ul {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  &:hover {
    color: $primary;
  }
}
input:focus,
textarea:focus,
button,
select {
  outline: none;
  -webkit-tap-highlight-color: rgb(255 255 255 / 0%);
}
img {
  display: block;
}

/* 布局 */
.clearfix {
  @include clearfix;
}
.fl {
  float: left;
}
.fr {
  float: right;
}
.center {
  @extend %center;
}
.ovh {
  overflow: hidden;
}
.hide {
  display: none !important;
}
.show {
  display: block !important;
}
.cover {
  @extend %cover;
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clamp {
  @include clamp;
}
.mc {
  margin: 0 auto;
}
.tac {
  text-align: center;
}
.tal {
  text-align: left;
}
.tar {
  text-align: right;
}
.lh24 {
  line-height: 24px;
}
.lh36 {
  line-height: 36px;
}

/* flex */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-justify-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-align-center {
  display: flex;
  align-items: center;
}

/* 宽度 */
.w10 {
  width: 10%;
}
.w20 {
  width: 20%;
}
.w25 {
  width: 25%;
}
.w33 {
  width: calc(100% / 3);
}
.w50 {
  width: 50%;
}
.w80 {
  width: 80%;
}
.w100 {
  width: 100%;
}

/* 字体 */
h1,
h2,
h3 {
  font-weight: 400;
}
h4,
h5,
h6 {
  font-weight: 700;
}
h1 {
  font-size: 32px;
}
h2 {
  font-size: 24px;
}
h3,
.ft18 {
  font-size: 18px;
}
h4,
.ft16 {
  font-size: 16px;
}
h5,
.ft14 {
  font-size: 14px;
}
h6,
.ft12 {
  font-size: 12px;
}
.text-success {
  color: $success;
}
.text-warning {
  color: $warning;
}
.text-error {
  color: $error;
}
.text-sub {
  color: $sub-color;
}
.text-gray {
  color: $disabled;
}
